﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using zhangmenren.Db;
using zhangmenren.Models;
using zhangmenren.ViewModel;

namespace zhangmenren.IService
{
    public interface IApplyService : IDependency
    {

		/// <summary>
		/// 添加申请
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		Task<int> Add(ApplyEntity entity);

		/// <summary>
		/// 根据用户标识查找申请
		/// </summary>
		/// <param name="userId"></param>
		/// <returns></returns>
		Task<IEnumerable<ApplyEntity>> FindByUserId(int userId);


		/// <summary>
		/// 查询申请列表
		/// </summary>
		/// <returns></returns>
		Task<IEnumerable<ApplyModel>> Select();

		/// <summary>
		/// 修改申请状态   0待审核  1通过   2未通过
		/// </summary>
		/// <returns></returns>
		Task<int> UpState(int id,int state);

        Task<int> Del(int id);

    }
}
